import { edit } from "@/utils/form";
import { getTableHeight } from "@/utils/table";

// 表格组件 传参
export default {
  data() {
    return {
      tableBtn: [
        {
          label: "编辑",
          mthods: (row, index) => edit("formProperty", this, this.addFormApi, row),
          // icon: "el-icon-plus",
          type: "text"
        }
      ],
      dataGrid: {
        visible: false,
        loading: false,
        height: getTableHeight("searchForm", "dataGrid", this, 255),
        columns: [
          {
            label: "客户简称",
            prop: "incomingModel",
            align: "center"
          },
          {
            label: "产品信息",
            prop: "modelType",
            // slot: "codeNumber",
            align: "center"
          }
        ],
        data: [
          {
            incomingModel: "客户简称",
            modelType: "产品信息",
            codeNumber1: "产品信息1111",
            codeNumber2: "产品信息222",
            edit: true
          },
          {
            incomingModel: "客户简称22",
            modelType: "产品信息1",
            edit: false
          },
          {
            incomingModel: "客户简称22",
            modelType: "产品信息1123123",
            edit: false
          },
          {
            incomingModel: "客户简称22",
            modelType: "产品信息",
            edit: false
          },
          {
            incomingModel: "客户简称22",
            modelType: "产品信息",
            edit: false
          },
          {
            incomingModel: "客户简称22",
            modelType: "产品信息",
            edit: false
          }
        ],
        pagination: {
          hidden: 2,
          pageNum: 1,
          pageSizes: [50, 100, 150],
          pageSize: 50,
          total: 0,
          pageCount: 0
        }
      }
    };
  },

  methods: {

  }
};
